using System;
using ns27;
using Triton.Game.Mono;

namespace Triton.Game.Mapping
{
	[Attribute38("DLLUtils")]
	public class DLLUtils : MonoClass
	{
		public DLLUtils(IntPtr address, string className)
			: base(address, className)
		{
		}

		public DLLUtils(IntPtr address)
			: this(address, "DLLUtils")
		{
		}

		public static IntPtr LoadLibrary(string filename)
		{
			return MonoClass.smethod_14<IntPtr>(TritonHs.MainAssemblyPath, "", "DLLUtils", "LoadLibrary", new object[1] { filename });
		}

		public static IntPtr GetProcAddress(IntPtr module, string funcName)
		{
			return MonoClass.smethod_11<IntPtr>(TritonHs.MainAssemblyPath, "", "DLLUtils", "GetProcAddress", new Class276.Enum20[2]
			{
				Class276.Enum20.ValueType,
				Class276.Enum20.String
			}, new object[2] { module, funcName });
		}

		public static IntPtr GetProcAddress(IntPtr module, IntPtr ordinalResource)
		{
			return MonoClass.smethod_11<IntPtr>(TritonHs.MainAssemblyPath, "", "DLLUtils", "GetProcAddress", new Class276.Enum20[2]
			{
				Class276.Enum20.ValueType,
				Class276.Enum20.ValueType
			}, new object[2] { module, ordinalResource });
		}

		public static bool FreeLibrary(IntPtr module)
		{
			return MonoClass.smethod_14<bool>(TritonHs.MainAssemblyPath, "", "DLLUtils", "FreeLibrary", new object[1] { module });
		}
	}
}
